<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>初心-交易墙</title>
		<meta name="description" content="" />
		<meta name="author" content="胡毅鹏" />
		<!--[if lt IE 9]>
			<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
		<link rel="shortcut icon" href="favicon.ico" />
        <link rel="stylesheet" href="{{ STATIC_URL }}css/reset.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="{{ STATIC_URL }}css/grid.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="{{ STATIC_URL }}css/master.css" type="text/css" media="screen" />
	</head>
	<body>
		<div>
			<header>
				<div class="container_12">
					<h1><a href="chuxin.html">初  心</a></h1>
					<nav id="mainNav" >
						<a href="chuxin.html">首页</a>
						<a href="#" class="selected">交易墙</a>
						<a href="#">图书库</a>
						<a href="#">讨论区</a>
					</nav>
					<form action="/search" method="">
						<input type="text" class="search-query" placeholder="搜索" />
					</form>
					<nav id="sideNav" class="gird_3" >
						<a href="#">胡太狼</a>
						<a href="#" >设置</a>
						<a href="#" >退出</a>
					</nav>
	
				</div>
			</header>
			<div class="container_12">
				<div class="grid_8 mainside">
					<div class="wallpanel">
			    		<nav class="wallinfohead">
                        <a href="{% url wall %}" class="">交易墙</a>
					        <span>&nbsp;·</span>
                            <a href="#" style="font-size: 16px;">{{ wall.wallkind.kind_name }}</a>
				        </nav>
				        <div  class="wallcontent" >
							<table cellpadding="0" cellspacing="0" border="0" width="100%">
								<tbody>
									<td style="padding-left: 12px;" valign="top">
										<div class="fr">
                                            <a href="#"><img src="{{ STATIC_URL }}img/icon.png" border="0" /></a>
										</div>
										<div class="sep3"></div>
										<span  style="font-size: 16px; line-height: 130%; ">
                                            <a href="#">{{ wall.title }}</a>
										</span>
										<div class="sep5"></div>
										<span class="created">
											<strong>
                                                <a href="{% url other_profile wall.user.id %}" class="dark">{{ wall.user.first_name }}</a>
											</strong><span>·</span>
											<strong>
                                                <a href="#" class="node">{{ wall.wallkind.kind_name }}</a>
											</strong><span>·</span>
                                            <span style="color: gray;">发布于&nbsp;{{ wall.creat_time }}</span>
										</span>
									</td>
								</tbody>
							</table>
							<div class="wallinfonote">
                                {% if book %}
                                <div style="text-align: center;"><img src="{{ book.imglink_douban }}" onload="fixImage(this, 528, 0)"></div>
                                {% else %}
                                {% if wall.img %}

                                <div style="text-align: center;"><img src="{{ MEDIA_URL }}{{ wall.img }}" onload="fixImage(this, 528, 0)"></div>
                                {% endif %}
                                {% endif %}
                                <pre>{{ wall.content }}</pre>
							</div>
							<div class="row">
								<div class="fr" align="right">
									<span style="font-size: 12px;line-height: 10px; color: #99a;margin-right: 6px;">24人收藏</span>
									<a href="#" class="btn-share">收藏</a>
									<a class="btn-share" href="javascript:void((function(s,d,e){if(/renren\.com/.test(d.location))return;var f='http://share.renren.com/share/buttonshare?link=',u=d.location,l=d.title,p=[e(u),'&title=',e(l)].join('');function%20a(){if(!window.open([f,p].join(''),'xnshare',['toolbar=0,status=0,resizable=1,width=626,height=436,left=',(s.width-626)/2,',top=',(s.height-436)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();})(screen,document,encodeURIComponent));" title="分享到人人">人人</a>
									<a class="btn-share" href="javascript:(function(){window.open('http://v.t.sina.com.cn/share/share.php?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href)+'&source=bookmark','_blank','width=450,height=400');})()">新浪微博</a>
									<a class="btn-share" href="javascript:void(function(){var d=document,e=encodeURIComponent,s1=window.getSelection,s2=d.getSelection,s3=d.selection,s=s1?s1():s2?s2():s3?s3.createRange().text:'',r='http://www.douban.com/recommend/?url='+e(d.location.href)+'&title='+e(d.title)+'&sel='+e(s)+'&v=1',x=function(){if(!window.open(r,'douban','toolbar=0,resizable=1,scrollbars=yes,status=1,width=450,height=330'))location.href=r+'&r=1'};if(/Firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})()" >豆瓣</a>
								</div>
							</div>
						</div>
			    	</div>
                    {% if comments %}
			    	<ul class="inforeply">
                        {% for comment in comments %}
			    		<li>
			    			<div class="userface">
			    				<a href="#"><img src="img/48.png" alt="胡太狼"></a>
			    			</div>
			    			<div class="userreply">
			    				<div class="userbg">
                                    <span><a href="#">{{ comment.user.first_name }}</a></span>
                                    <span style="float:right;">{{ comment.time }}</span>
			    				</div>
			    				<div class="replydetail">
                                    <pre>{{ comment.user.get_profile.resume }}{{ comment.content }} </pre>
			    				</div>
			    			</div>
			    		</li>
                        {% endfor %}
			    	</ul>
                    {% endif %}
                    <form class="selfreply" method="post" action="" style="border-top: 1px dashed #E2E2E2; padding-top: 10px;display : {%  if not user.is_authenticated %} none {% endif %}">
						<div class="userface">
                            <a href="#"><img src="img/48.png" alt="{{ user.first_name }}"></a>
			    		</div>
			    		<div class="userreply">
                            <label for="replynote">{{ form.replynote.label }}</label>
                            {{ form.replynote }}
			    		    <span>
			    		        <input type="submit" value="回应" class="btn-reply" />
			    			</span>
		    			</div>
					</form>
			    </div>
			    <div class="grid_4 sidebar">
			    	<div class="btnbox">
			    		<a href="#" class="btn-post">我有闲置物品</a>
			        </div>

			     	<div class="communityinfo">
			    		<p>你的某些物品是否还在某个角落睡觉呢？</p><br />
			    		<p>让它来初心吧，或许某个人正在寻找它...</p><br />
			    		<p>编辑信息时，不妨说明一下所在位置和心理价格。</p>
			    	</div>
			    </div>
			    <div class="clearfix" />
			</div>
			
			<footer class="container_12">
				<nav class="footinfo">
					<a href="#">关于</a>
					<span>·</span>
					<a href="#">联系</a>
					<span>·</span>
					<a href="#">反馈</a>
					<span>&copy;2012 chuxin.me</span>
				</nav>
			</footer>
		</div>


		<script type="text/javascript">
			/**//** 
 * 自动按比例压缩图片 
 * i--图片对象 
 * w--最大宽度 
 * h--最大高度 
 */ 
function fixImage(i,w,h)  { 
  var ow = i.width; 
    var oh = i.height; 
    var rw = w/ow; 
    var rh = h/oh; 
    var r = Math.min(rw,rh); 
    if (w ==0 && h == 0)   { 
        r = 1; 
    }else if (w == 0)   { 
        r = rh<1?rh:1; 
    }else if (h == 0)   { 
        r = rw<1?rw:1; 
    } 
    if (ow!=0 && oh!=0)   { 
    i.width = ow * r; 
      i.height = oh * r; 
    }else   { 
      var __method = this, args = $A(arguments); 
        window.setTimeout(function()    { 
          fixImage.apply(__method, args); 
        }, 200); 
    } 
    i.onload = function()   {} 
}
		</script>

	</body>
</html>
